package cn.ffcs.organ.dao;

import java.util.List;

import cn.ffcs.base.dao.ExtBaseDAO;
import cn.ffcs.organ.model.LinkMethod;

/**
 * 联系方式DAO<br/>
 * <table>
 * <tr>
 * <td>负责人/principal:</td>
 * <td colspan="2">liuzhh</td>
 * <tr>
 * <td>修改记录/revision:</td>
 * <td colspan="2"></td>
 * </tr>
 * <tr>
 * <td>日期:</td>
 * <td>修改人:</td>
 * <td>修改说明:</td>
 * </tr>
 * <tr>
 * <td></td>
 * <td></td>
 * <td></td>
 * </tr>
 * </table>
 * @author liuzhh
 * @version $Id$
 */
public class LinkMethodDAO<L extends LinkMethod> extends ExtBaseDAO<L> implements
        ILinkMethodDAO<L>
{

    public String getEntityName()
    {
        return new LinkMethod().getClass().getName();
    }
    
	public LinkMethod findByIdAndType(String person, String type) {
		String hql=" from LinkMethod a where a.person='"+person+"' and a.type='"+type+"'";
		List<LinkMethod> list=getHibernateTemplate().find(hql);
		if(list.size()==0){
			return null;
		}else{
			return (LinkMethod) list.get(0);
		}
	}
    
}
